import { Component, OnInit } from '@angular/core';
import {Location} from '@angular/common'
import { Router} from "@angular/router";

@Component({
  selector: 'app-spider-overview',
  templateUrl: './spider-overview.component.html',
  styleUrls: ['./spider-overview.component.css']
})
export class SpiderOverviewComponent implements OnInit {
  constructor(
    private location:Location,
    private router: Router
  ) { }

  public data1 = [{
    name: '标准值',
    color:'#4f81bd',
    data: [1, 1, 1, 1, 1],
    pointPlacement: 'on'
  }, {
    name: '最大值',
    color:'#c0504d',
    data: [0.8, 0.7, 1.3, 1.1, 1],
    pointPlacement: 'on'
  }];
  public data2 = [{
    name: '温差',
    color:'#9eb768',
    data: [13, 11, 12, 11, 10],
    pointPlacement: 'on'
  }];
  public data3 = [{
    name: '变化率',
    color:'#7d719c',
    data: [4, 4, 7, 11, 5],
    pointPlacement: 'on'
  }]

  ngOnInit() {
  }
  public goBack(flag?:boolean){
    if(flag){
      this.location.back()
    }
    else {
      this.router.navigate(['/pages/home'])
    }
  }
}
